function trim(string) 
{
return string.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}
